package io.renren.common.utils;

import io.renren.modules.sys.entity.SysUserEntity;
import org.apache.shiro.SecurityUtils;

/**
 * 用户工具类
 * @author zh
 * @date 2018/9/1817:31
 */
public class UserUtil {

    /**
     * 获取当前用户
     * @return
     */
    public static SysUserEntity getCurrentUser(){
        return  ((SysUserEntity) SecurityUtils.getSubject().getPrincipal());
    }
}
